package com.tee.live.im.core.server.handler;


import com.tee.live.im.core.server.common.ImContextUtils;
import com.tee.live.im.core.server.common.ImMsg;
import io.netty.channel.ChannelHandlerContext;
import org.springframework.stereotype.Component;

/**
 * @description: 处理ack消息
 * @author tee
 * @date 2025/11/3
 */
@Component
public class AckImMsgHandler implements SimplyHandler {

    @Override
    public void handler(ChannelHandlerContext ctx, ImMsg imMsg) {
        Long userId = ImContextUtils.getUserId(ctx);
        Integer appId = ImContextUtils.getAppId(ctx);
            if (userId == null || appId == null) {
                ctx.close();
                throw new IllegalArgumentException("attr is error");
            }
    }
}
